/**
 * Created by jrocha on 9/18/14.
 */
public class Fifth {
    public Fifth(String message){
        this.message = message;
    }

    public void printMessage(){
        System.out.print(message);
    }

    public void printLine(int times){
        for (int count = 0; count < times; ++count){
            printMessage();
        }
    }

    public void printWhiteSpaces(int times){
        for (int count = 0; count < times; ++count){
            System.out.print(" ");
        }
    }

    public void printTriangle(int times){
        int countChar = 1;
        int countWhiteSpaces = times - 1;
        for (int countLine = 1; countLine <= times; ++countLine){
            printWhiteSpaces(countWhiteSpaces);
            printLine(countChar);

            countChar += 2;
            --countWhiteSpaces;
            System.out.println("");
        }
        System.out.println("");
    }

    private String message;
}
